import Cookies from 'js-cookie'

const TokenKey = 'aiexamine_enterprise_token'
export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}

// 用户信息
export function setUserInfo(userInfo) {
  return Cookies.set('userInfo', userInfo)
}
export function getUserInfo() {
  return Cookies.get('userInfo')
}
export function removeUserInfo() {
  return Cookies.remove('userInfo')
}
//   roles: null,//角色id 集合
export function setRolesMes(val) {
  return Cookies.set('rolesMes', val)
}
export function getRolesMes() {
  return Cookies.get('rolesMes')
}
export function removeRolesMes() {
  return Cookies.remove('rolesMes')
}

// 公司名称
export function setUserUnitName(val) {
  return Cookies.set('userUnitName', val)
}
export function getUserUnitName() {
  return Cookies.get('userUnitName')
}
export function removeUserUnitName() {
  return Cookies.remove('userUnitName')
}
// 整个表的时间选择
export function setTotalDate(val) {
  return Cookies.set('timeType', val)
}
export function getTotalDate() {
  return Cookies.get('timeType')
}
export function removeTotalDate() {
  return Cookies.remove('timeType')
}
